package com.rgp.apidriver.controller;

import com.rgp.apidriver.service.DriverUserService;
import com.rgp.internalcommon.dto.DriverUserDto;
import com.rgp.internalcommon.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author nhp
 * @version 1.0
 * @description TODO
 * @date 2024-04-16 18:51
 */
@RestController
public class DriverUserController {
    @Autowired
    private DriverUserService driverUserService;

    @PostMapping("/driver-user")
    public ResponseResult addDriverUser(@RequestBody DriverUserDto driverUserDto){
        return driverUserService.addDriverUser(driverUserDto);
    }

    @PutMapping("/driver-user")
    public ResponseResult updateDriverUser(@RequestBody DriverUserDto driverUserDto){
        return driverUserService.updateDriverUser(driverUserDto);
    }
}